<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
import socketInstance from './utils/socket';
export default {
  name: 'app',
  beforeDestroy() {
    if (!this.$socket) return;
    this.sockets.unsubscribe('message');
    this.socket.emit('exit', this.$store.getters.userId);
    socketInstance.close();
  },
};
</script>

<style>
html,
body {
  font-size: 12px;
  height: 100%;
  margin: 0;
}
#app {
  height: 100%;
}
.el-notification.right {
  cursor: pointer;
}
</style>
<style lang="scss" scoped>
@import '@/assets/css/views/content.scss';
</style>
